/**
 * 
 */
package com.example.radioclub.podcast;

import com.example.radioclub.MainPageActivity;
import com.example.radioclub.R;
import com.example.radioclub.data.Constants;
import com.example.radioclub.music.MusicActivity;
import com.example.radioclub.music.tasks.RestJSONDownloader;
import com.example.radioclub.playlist.PlaylistActivity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;

/**
 * This class was intended to be the center activity for podcasting. Since there
 * is nothing here, please define the podcast function here.
 * 
 * In order to provide podcast, you might want to provide all radio with their own
 * non-music content. You can do this by using Suara Radio API provided in Constants.
 * The result should be in JSON String format so you won't get any trouble with this.
 * 
 * @author wizard
 * 
 */
public class PodcastActivity extends Activity implements OnClickListener{
	private final String TAG = Constants.APP_TAG + "Podcast Activity";
	private RestJSONDownloader restJSONDownloader = null;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.podcast_page_layout);
	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		switch (v.getId()) {
		case R.id.podcast_button:
			/*
			 * This button goes to nothing since this is the podcast itself.
			 * Feel free to make modification such as refreshing page or
			 * something.
			 */
			break;
		case R.id.music_button:
			startActivity(new Intent(this, MusicActivity.class));
			break;
		case R.id.playlist_button:
			startActivity(new Intent(this, PlaylistActivity.class));
			break;
		case R.id.log_out_button:
			startActivity(new Intent(this, MainPageActivity.class));
			this.finish();
			break;
		}
	}
}
